
package com.ctyun.xstore.s3.api.bucket;

import com.amazonaws.AmazonServiceException;
import com.amazonaws.services.s3.AmazonS3;
import com.ctyun.xstore.s3.client.AmazonS3ClientBuilder;


public class DeleteBucketPolicy {
    public static void deleteBucketPolicy(String bucketName) {
        AmazonS3 s3 = AmazonS3ClientBuilder.buildAmazonS3Client();
        try {
            s3.deleteBucketPolicy(bucketName);
        } catch (AmazonServiceException e) {
            System.err.println(e.getErrorMessage());
        }

        System.out.println("Done!");
    }
}
